package com.itheima.mapper;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
	@Select("select * from tb_user where username=#{userName} and password=#{password}")
	User select(@Param("userName") String username,@Param("password") String password);

	@Select("select * from tb_user where username=#{userName}")
	User selectByUserName(String username);

	@Insert("insert into tb_user(id,username,password) values(null,#{userName},#{password})")
	boolean add(User user);
}
